sample=$1

echo "##fileformat=VCFv4.2" > ${SigProfiler_path}/vcf_combine/${sample}.vcf
echo "##INFO=<ID=t_alt_count,Number=1,Type=Integer,Description="t_alt_count"" >> ${SigProfiler_path}/vcf_combine/${sample}.vcf
echo "#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	Tumor" >> ${SigProfiler_path}/vcf_combine/${sample}.vcf

## 只看CDS上的突变
Variant_Types="Missense_Mutation|Nonsense_Mutation|Frame_Shift_Ins|Frame_Shift_Del|In_Frame_Ins|In_Frame_Del|Splice_Site|Nonstop_Mutation"

cat ${maf_public_path}/All_use.addVAF.maf | grep -E ${Variant_Types} | grep -w ${sample} | \
awk -F'\t' '{OFS="\t"}{print $1,$2,".",$4,$5,".",".","t_ref_count="$10";t_alt_count="$9,".","."}' \
>> ${SigProfiler_path}/vcf_combine/${sample}.vcf

## 总体的突变
echo "##fileformat=VCFv4.2" > ${SigProfiler_path}/vcf_combine_allMuts/${sample}.vcf
echo "##INFO=<ID=t_alt_count,Number=1,Type=Integer,Description="t_alt_count"" >> ${SigProfiler_path}/vcf_combine_allMuts/${sample}.vcf
echo "#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	Tumor" >> ${SigProfiler_path}/vcf_combine_allMuts/${sample}.vcf

cat ${maf_public_path}/All_use.addVAF.maf | grep -w ${sample} | \
awk -F'\t' '{OFS="\t"}{print $1,$2,".",$4,$5,".",".","t_ref_count="$10";t_alt_count="$9,".","."}' \
>> ${SigProfiler_path}/vcf_combine_allMuts/${sample}.vcf
